package com.zbkj.crmeb.order.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单sku规格
 * @Description: 
 * @author daigb
 * @date 2021-06-17
 */
@Data
public class OutOrderInfoRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品barCode")
    private String barCode;

    @ApiModelProperty(value = "sourceSkuId")
    private String sourceSkuId;

    @ApiModelProperty(value = "购买数量")
    private Integer cartNum;

    @ApiModelProperty(value = "支付总金额")
    private BigDecimal price;
    
    @ApiModelProperty(value = "商品详情")
    private Product productInfo;

    /**
     * 前端数据展示需要
     * @Description: 
     * @author daigb
     * @date 2021-06-18
     */
    @Data
    public static class Product {
        @ApiModelProperty(value = "市场价")
        private BigDecimal otPrice;
        @ApiModelProperty(value = "支付金额")
        private BigDecimal price;
        @ApiModelProperty(value = "商品名称")
        private String storeName;
        @ApiModelProperty(value = "商品编码")
        private String barCode;
        @ApiModelProperty(value = "发货模板")
        private Integer tempId;
        @ApiModelProperty(value = "参数模板")
        private AttrInfo attrInfo;
        @ApiModelProperty(value = "货号")
        private String keyword;
        @ApiModelProperty(value = "图片")
        private String image;
        @ApiModelProperty(value = "平台加价率")
        private BigDecimal platRatio;
        @ApiModelProperty(value = "商户加价率")
        private BigDecimal merRatio;
        @ApiModelProperty(value = "加价金额")
        private BigDecimal raisePrice;
        @ApiModelProperty(value = "是否是europe接口数据")
        private Integer isEurope;

        @Data
        public static class AttrInfo {
            @ApiModelProperty(value = "规格")
            private String suk;
            @ApiModelProperty(value = "商品编码")
            private String barCode;
            @ApiModelProperty(value = "支付金额")
            private BigDecimal price;
            @ApiModelProperty(value = "商户成本价")
            private BigDecimal cost;
            @ApiModelProperty(value = "平台成本价")
            private BigDecimal sourceCost;
            @ApiModelProperty(value = "建议销售价")
            private BigDecimal otPrice;
            @ApiModelProperty(value = "sku_id")
            private String sourceSkuId;
            @ApiModelProperty(value = "商品金额 （售价-积分抵扣金额）")
            private BigDecimal productPaidPrice;
            @ApiModelProperty(value = "商品实际支付金额")
            private BigDecimal paidPrice;
            @ApiModelProperty(value = "子订单总金额")
            private BigDecimal subTotalPrice;
            @ApiModelProperty(value = "积分抵扣金额")
            private BigDecimal deductionPrice;
            @ApiModelProperty(value = "使用的积分数")
            private BigDecimal useIntegral;
            @ApiModelProperty(value = "首段物流")
            private BigDecimal firstPrice;
            @ApiModelProperty(value = "二段物流")
            private BigDecimal secondPrice;
            @ApiModelProperty(value = "税费")
            private BigDecimal taxPrice;
            @ApiModelProperty(value = "运税费")
            private BigDecimal taxAndSecondPrice;
        }
    }

}
